package com.Keven.observer;

public class Test {
    public static void main(String[] args) {
        WeChatServer server = new WeChatServer();

        Observer user1 = new User("zhangsan");
        Observer user2 = new User("lisi");
        Observer user3 = new User("wangwu");

        server.registerObserver(user1);
        server.registerObserver(user2);
        server.registerObserver(user3);

        server.setInformation("Java是世界上最好的语言");

        System.out.println("-------------------------------------");
        server.removeObserver(user1);
        server.setInformation("Java是世界上最好的语言");
    }
}
